/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.delivery.parcel.app.facade;

import com.delivery.parcel.app.config.GetContext;
import com.delivery.parcel.services.crud.CustomerCrudService;
import com.delivery.parcel.services.crud.EmployeeCrudService;
import com.delivery.parcel.services.crud.ParcelCrudService;
import java.io.Serializable;
import org.springframework.context.ApplicationContext;

/**
 *
 * @author Malotana
 */
public class Facade implements Serializable{
    private final static ApplicationContext ctx = GetContext.getApplicationContext();
    private ParcelCrudService parcelCrudService;
    private EmployeeCrudService employeesCrudService;
    private CustomerCrudService customerCrudService;
    
     public ParcelCrudService geParcelCrudService() {
        parcelCrudService = (ParcelCrudService) ctx.getBean("parcelCrudService");
        return parcelCrudService;
    }
    
    public EmployeeCrudService getEmployeesCrudService(){
        employeesCrudService = (EmployeeCrudService)ctx.getBean("employeeCrudService");
        return employeesCrudService;
    }
    
    public CustomerCrudService getCustomerCrudService() {
        customerCrudService = (CustomerCrudService)ctx.getBean("customerCrudService");
        return customerCrudService;
    }  
}